package com.zhongyu.pojo;


import com.baomidou.mybatisplus.annotation.TableField;
import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.context.annotation.Configuration;

import java.time.LocalDateTime;
@Configuration
@Data
@AllArgsConstructor
@NoArgsConstructor
public class Order {
	//未出库
	public static final String STATE_WEI="0";

	public static String getStateWei() {
		return STATE_WEI;
	}

	public String getState() {
		return state;
	}

	public String setState(String state) {
		return this.state = state;
	}

	//已出库
	public static final Integer STATE_CHU=1;
	/** 未审核 */
	public static final String STATE_CREATE = "0";
	/** 已审核 */
	public static final String STATE_CHECK = "1";
	/** 已确认 */
	public static final String STATE_START = "2";
	/** 已入库 */
	public static final Integer STATE_END = 3;
	//已出库

	/** 采购订单 */
	public static final String TYPE_IN = "1";
	/** 销售订单 */
	public static final String TYPE_OUT = "2";
	public static String getStateCreate() {
		return STATE_CREATE;
	}

	public static String getStateCheck() {
		return STATE_CHECK;
	}

	public static String getStateStart() {
		return STATE_START;
	}


	public static String getTypeIn() {
		return TYPE_IN;
	}

	public static String getTypeOut() {
		return TYPE_OUT;
	}
	public LocalDateTime getCreateTime() {
		return createTime;
	}

	public void setCreateTime(LocalDateTime createTime) {
		this.createTime = createTime;
	}

	public LocalDateTime getCheckTime() {
		return checkTime;
	}

	public LocalDateTime setCheckTime(LocalDateTime checkTime) {
		this.checkTime = checkTime;
		return checkTime;
	}

	public LocalDateTime getPurchaseTime() {
		return this.purchaseTime=purchaseTime;
	}

	public LocalDateTime setPurchaseTime(LocalDateTime purchaseTime) {
		return this.purchaseTime = purchaseTime;
	}

	public LocalDateTime getStockTime() {
		return stockTime;
	}

	public void setStockTime(LocalDateTime stockTime) {
		this.stockTime = stockTime;
	}

	private Integer id;
	@TableField(exist = false)
	private Provider provider;
	@TableField(exist = false)
	private OrderDetail orderDetail;

	@TableField(exist = false)
	private User user;
	/**
	 * 生成日期
	 */	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	private java.time.LocalDateTime createTime;

	/**
	 * 审核日期
	 */	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	private java.time.LocalDateTime checkTime;

	/**
	 * 采购日期
	 */	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	private java.time.LocalDateTime purchaseTime;

	/**
	 * 入库或出库日期
	 */	@JsonFormat(pattern = "yyyy-MM-dd HH:mm")
	private java.time.LocalDateTime stockTime;

	/**
	 * 1:采购 2：销售
	 */
	private Integer type;

	/**
	 * 下单员
	 */
	private Integer creator;

	/**
	 * 审核员
	 */
	private Integer checker;

	/**
	 * 采购员
	 */
	private Integer purchaser;

	/**
	 * 库管员
	 */
	private Integer stockKeeper;

	/**
	 * 供应商或客户ID
	 */
	private Integer providerId;

	/**
	 * 合计金额
	 */
	private Double totalMoney;

	/**
	 * 采购: 0:未审核 1:已审核, 2:已确认, 3:已入库；销售：0:未出库 1:已出库
	 */
	private String state;

	/**
	 * 运单号
	 */
	private String wayBillCode;


	public String getWayBillCode() {
		return wayBillCode;
	}

	public String setWayBillCode(String wayBillCode) {
		this.wayBillCode = wayBillCode;

		return wayBillCode;
	}

}
